<template>
	<view class="lose-goods-item">
		<!-- 商品详情 -->
		<view class="first-line">
			<!-- 选择按钮+图片框 -->
			<view class="left-box">
				<radio :checked="goods.goods_state" color="gray"/>
				<image src="../../static/my-images/test.jpg" class="goods-pic"></image>
			</view>
			<!-- 文字描述+价格+操作 -->
			<view class="right-box">
				<view class="goods-name">{{goods.goods_name}}</view>
				<!-- 失效原因 -->
				<view v-show="goods.goods_purchase_limit" class="reason-box">抱歉，秒杀商品已到期</view>
				<!-- 操作 -->
				<view class="opera-btn-box">
					<view class="opera-btn">
						秒杀提醒1
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"lose-efficacy-goods",
		data() {
			return {
				
			};
		},
		methods:{
			/* 修改商品数量 */
			numChangeHandler(){
				console.log('数量改变');
			},
			/* 修改商品数量 */
			numChangeHandler(value){
				this.$emit('num-change',{
					goods_id:this.goods.goods_id,
					goods_count:value
				})
			}
		},
		onLoad() {
		},
		props:{
			goods:{
				type:Object,
				default:{}
			}
		}
	}
</script>

<style lang="scss">
	.lose-goods-item {
		padding: 10rpx 20rpx;
		border-radius: 10rpx;
		background-color: white;

		.first-line {
			display: flex;
			justify-content: flex-start;
			align-items: center;
			.left-box {
				display: flex;
				align-items: center;
				.goods-pic {
					width: 200rpx;
					height: 200rpx;
					display: block;
					margin-left: 10rpx;
				}
			}
			.right-box {
				margin-left: 10rpx;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				align-items: flex-start;
				color: gray;
				.goods-name {
					font-size: 14px;
					padding-right: 20rpx;
				}
				.reason-box {
					font-size: 12px;
					margin-top: 10rpx;
				}
				.opera-btn-box {
					display: flex;
					justify-content: flex-end;
					align-items: center;
				}
				.opera-btn {
					border: 2rpx solid gray;
					height: 40rpx;
					line-height: 40rpx;
					padding: 0 10rpx;
					border-radius: 40rpx;
				}
			}
		}
	}
</style>